package com.hh.feign.hystrix;

import com.hh.domain.Order;
import com.hh.feign.UserOrderFeign;
import org.springframework.stereotype.Component;

@Component
public class UserOrderFeignHystrix implements UserOrderFeign {
    /**
     * 一般远程调用的熔断 可以写null值
     *
     * @param userId
     * @return
     */
    @Override
    public Order getOrderByUserId(Integer userId) {
        System.err.println("熔断了");
        return new Order().setOrderId(2).setName("失败的食物").setPrice(0D);
    }
}
